home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Deutsche Edition 1
/
Deutsche Edition 1.iso
/
amok
/
071-080
/
amok75
/
oberon3.0
/
o3demo2.lzh
/
Beispiele
/
Mandel.mod
< prev
next >
Wrap
Text File
|
1992-08-22
|
635b
|
29 lines
MODULE Mandel;
IMPORT xy : XYplane;
VAR
zr,zi,ar,ai,dr,di,sr,si,st: LONGINT;
x, y, i: INTEGER;
BEGIN
sr := 300000H DIV xy.W; si := 200000H DIV xy.H;
st := -2*100000H; zi := 100000H;
FOR y := 0 TO xy.H-1 DO
IF CAP(xy.Key())="Q" THEN HALT(0) END;
DEC(zi,si); zr := st;
FOR x := 0 TO xy.W-1 DO
i := 0; ar := zr; ai := zi;
REPEAT
dr := ar DIV 400H; di := ai DIV 400H;
ai := 2 * dr * di + zi;
dr := dr*dr; di := di*di;
ar := dr - di + zr;
INC(i)
UNTIL (i > 17) OR (dr + di > 400000H);
xy.Dot(x,y,i MOD 2);
INC(zr,sr);
END;
END
END Mandel.